<?php

class Model_DbTable_BrowseHistory extends Zend_Db_Table
{

    protected $_name = 'browse_history';

    protected $_rowClass = 'Model_BrowseHistory';
    
    public function getArtwork(){
    	$table = new Model_DbTable_ArtWork();
    	$artwork = $table->fetchRow("id = $this->artwork_id");
    	return $artwork;
    }
    
    public function getUser(){
    	if ($this->user_id != 0 ){
    		$table = new Model_DbTable_Customer();
    		$theUser = $table->fetchRow("id = $this->user_id");
    		return $theUser;
    	}
    	
    	return null;
    }


}

